<?php
define('IN_MESSAGE', true);
?>
<include file="Common/header" />
<?php
$label = 'info';
$icon = 'info-circle';
$type = C('MSG_TYPE');
if(empty($type)) {
    $type = $status ? MSG_TYPE_SUCCESS : MSG_TYPE_INFO;
}
switch($type) {
    case MSG_TYPE_DANGER:
        $label = 'danger';
        $icon = 'times-circle';
        break;
    case MSG_TYPE_INFO:
        $label = 'info';
        $icon = 'info-circle';
        break;
    case MSG_TYPE_WARNING:
        $label = 'warning';
        $icon = 'exclamation-triangle';
        break;
    case MSG_TYPE_SUCCESS:
        $label = 'success';
        $icon = 'check-circle';
        break;
}
?>
<div class="jumbotron clearfix alert alert-{$label}">
    <div class="row">
        <div class="col-xs-12 col-sm-4 col-md-3 col-lg-2 text-center" style="padding-top:1.5em;">
            <i class="fa fa-5x fa-{$icon}"></i>
        </div>
        <div class="col-xs-12 col-sm-8 col-md-9 col-lg-10">
            <h2>{$msgTitle}</h2>
            <p>{$message}{$error}</p>
            <if condition="!empty($jumpUrl)">
                <p><a href="{$jumpUrl}" class="alert-link">如果你的浏览器没有自动跳转，请点击此链接</a></p>
                <script type="text/javascript">
                    setTimeout(function () {
                        location.href = "{$jumpUrl}";
                    }, {$waitSecond} * 1000);
                </script>
                <else />
                <p>[<a href="javascript:history.go(-1);" class="alert-link">点击这里返回上一页</a>] &nbsp; [<a href="?refresh" class="alert-link">首页</a>]</p>
            </if>
        </div>
    </div>
</div>
<include file="Common/footer" />
